<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <!--  CSRF  -->
    <meta name="_csrf" th:content="${_csrf.token}"/>
    <!--  default header name is X-CSRF-TOKEN  -->
    <meta name="_csrf_header" th:content="${_csrf.headerName}"/>
    <!--  CSRF  -->
    <title>Title</title>
</head>
<body>
<form class="form-horizontal" th:action= "@{/templates/admin/user}" method="post">
    <label for="name">用户名</label>
    <input type="text" id="name" name="name" placeholder="name">
    <label for="password">密码</label>
    <input type="text" id="password" name="password" placeholder="password">
    <label for="" class="col-sm-2 control-label">角色</label>
    <div class="col-sm-10">
        <select name="role" id="" class="form-control">
            <option th:each="adminRole: ${adminRoles}" th:text="${adminRole.cnname}" th:value="${adminRole.role}"></option>
        </select>
        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}">
        <input type="submit" value="提交" class="btn btn-info">
    </div>
</form>
</body>
</html>